package model

import (
	"gorm.io/gorm"
	"time"
)

type SysJobLog struct {
	gorm.Model
	JobID     uint      `json:"jobId" gorm:"comment:任务ID"`
	JobName   string    `json:"jobName" gorm:"type:varchar(100);comment:任务名称"`
	Args      string    `json:"args" gorm:"type:varchar(255);comment:执行参数"`
	Status    string    `json:"status" gorm:"type:varchar(10);comment:状态 success/fail"`
	ErrorMsg  string    `json:"errorMsg" gorm:"type:text;comment:错误信息"`
	StartTime time.Time `json:"startTime" gorm:"comment:开始时间"`
	Duration  int64     `json:"duration" gorm:"comment:耗时（毫秒）"`
}

func (SysJobLog) TableName() string {
	return "sys_job_log"
}
